/* pages/spots/index.less */
/* 基于全局设计系统的钓点库页面样式 */

// 导入全局样式变量
@import '../../app.less';

/* 基础容器样式 */
.spots-container {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background-color: @bg-color;
}

/* 地图容器样式 */
.map-container {
  width: 100%;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* 地图控件样式 */
.map-controls {
  position: absolute;
  top: @header-height + @spacing-sm;
  right: @spacing-sm;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: @spacing-sm;
}

.control-button {
  width: 88rpx;
  height: 88rpx;
  border-radius: 50%;
  background: @card-bg;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all @transition-normal;
}

.control-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.control-button:active {
  transform: scale(0.95);
}

.control-button image {
  width: 48rpx;
  height: 48rpx;
}

/* 右侧浮动菜单样式已迁移至全局样式文件app.less中 */

/* 钓点信息窗口样式 */
.spot-info-window {
  width: 300rpx;
  padding: @spacing-sm;
  background-color: @card-bg;
  border-radius: @card-radius;
  box-shadow: @card-shadow;
  overflow: hidden;
  z-index: 30;
}

.spot-info-title {
  font-size: @font-size-md;
  font-weight: 600;
  color: @text-primary;
  margin-bottom: @spacing-xs;
}

.spot-info-detail {
  font-size: @font-size-sm;
  color: @text-secondary;
  line-height: @line-height-md;
  margin-bottom: @spacing-xs;
}

.spot-info-image {
  width: 100%;
  height: 180rpx;
  border-radius: @button-radius;
  overflow: hidden;
  margin-bottom: @spacing-xs;
}

.spot-info-image image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spot-info-actions {
  display: flex;
  gap: @spacing-xs;
  margin-top: @spacing-xs;
}

.spot-info-button {
  flex: 1;
  padding: @spacing-xs;
  text-align: center;
  font-size: @font-size-sm;
  border-radius: @button-radius;
  transition: all @transition-normal;
}

.spot-info-button.primary {
  background-color: @primary-color;
  color: #fff;
}

.spot-info-button.primary:hover {
  background-color: @primary-dark;
}

.spot-info-button.secondary {
  background-color: @border-light;
  color: @text-secondary;
}

.spot-info-button.secondary:hover {
  background-color: @border-dark;
}

/* 钓点标记样式 */
.spot-marker {
  position: relative;
  width: 40rpx;
  height: 40rpx;
}

.spot-marker-icon {
  width: 40rpx;
  height: 40rpx;
  border-radius: 50%;
  background-color: @primary-color;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: @font-size-xs;
  box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.2);
}

.spot-marker-label {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 4rpx 10rpx;
  background-color: rgba(0,0,0,0.7);
  color: #fff;
  font-size: @font-size-xs;
  border-radius: 8rpx;
  margin-bottom: 10rpx;
  white-space: nowrap;
}

/* 我的钓点标记特殊样式 */
.my-spot-marker .spot-marker-icon {
  background-color: @accent-color;
}

/* 热门钓点标记动画 */
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.hot-spot-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: rgba(255,153,0,0.6);
  animation: pulse 2s infinite;
  z-index: -1;
}

/* 底部操作栏 */
.bottom-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: @spacing-sm;
  background-color: @card-bg;
  box-shadow: 0 -2rpx 10rpx rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
}

.action-button {
  padding: @spacing-xs @spacing-md;
  background-color: @primary-color;
  color: #fff;
  border-radius: @button-radius;
  font-size: @font-size-sm;
  font-weight: 500;
  transition: all @transition-normal;
}

.action-button:hover {
  background-color: @primary-dark;
}

.action-button:active {
  transform: scale(0.95);
}

/* 钓点列表样式 (当切换到列表视图时) */
.spot-list-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: @bg-color;
  z-index: 20;
  transform: translateX(0);
  transition: transform @transition-normal;
}

.spot-list-container.hidden {
  transform: translateX(-100%);
}

.spot-list-header {
  height: @header-height;
  padding: 0 @spacing-sm;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: @card-bg;
  box-shadow: 0 2rpx 10rpx rgba(0,0,0,0.05);
}

.spot-list-title {
  font-size: @font-size-lg;
  font-weight: 600;
  color: @text-primary;
}

.spot-list {
  height: calc(100vh - @header-height);
  overflow-y: auto;
  padding: @spacing-sm;
}

.spot-list-item {
  background-color: @card-bg;
  border-radius: @card-radius;
  padding: @spacing-sm;
  margin-bottom: @spacing-sm;
  box-shadow: @card-shadow;
  transition: all @transition-normal;
}

.spot-list-item:hover {
  transform: translateY(-2rpx);
  box-shadow: 0 6rpx 16rpx rgba(0,0,0,0.1);
}

.spot-list-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: @spacing-xs;
}

.spot-list-item-title {
  font-size: @font-size-md;
  font-weight: 600;
  color: @text-primary;
}

.spot-list-item-distance {
  font-size: @font-size-xs;
  color: @text-tertiary;
}

.spot-list-item-image {
  width: 100%;
  height: 200rpx;
  border-radius: @button-radius;
  overflow: hidden;
  margin-bottom: @spacing-xs;
}

.spot-list-item-image image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spot-list-item-detail {
  font-size: @font-size-sm;
  color: @text-secondary;
  line-height: @line-height-md;
  margin-bottom: @spacing-xs;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spot-list-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8rpx;
  margin-bottom: @spacing-xs;
}

.spot-list-item-tag {
  padding: 4rpx 12rpx;
  background-color: @border-light;
  color: @text-tertiary;
  font-size: @font-size-xs;
  border-radius: 16rpx;
}

.spot-list-item-actions {
  display: flex;
  justify-content: flex-end;
  gap: @spacing-xs;
}

/* 响应式调整 */
@media (max-width: @breakpoint-sm) {
  .control-button,
  .right-float-menu > view {
    width: 72rpx;
    height: 72rpx;
  }

  .control-button image,
  .right-float-menu > view image {
    width: 36rpx;
    height: 36rpx;
  }

  .spot-info-window {
    width: 240rpx;
  }
}

/* 加载提示 */
.loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  background-color: rgba(255,255,255,0.8);
  padding: @spacing-md;
  border-radius: @card-radius;
  box-shadow: @card-shadow;
}

.loading-spinner {
  width: 60rpx;
  height: 60rpx;
  border: 8rpx solid @border-light;
  border-top: 8rpx solid @primary-color;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: @spacing-sm;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: @font-size-sm;
  color: @text-secondary;
}

/* 空状态提示 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400rpx;
  color: @text-tertiary;
  font-size: @font-size-sm;
  text-align: center;
  padding: 0 @spacing-md;
}

.empty-state image {
  width: 120rpx;
  height: 120rpx;
  margin-bottom: @spacing-sm;
  opacity: 0.5;
}

/* 切换视图动画 */
.slide-enter {
  transform: translateX(-100%);
}

.slide-enter-active {
  transform: translateX(0);
  transition: transform @transition-normal;
}

.slide-exit {
  transform: translateX(0);
}

.slide-exit-active {
  transform: translateX(-100%);
  transition: transform @transition-normal;
}

/* 筛选面板 */
.filter-panel {
  position: absolute;
  top: @header-height + @spacing-sm + 80rpx;
  left: @spacing-sm;
  right: @spacing-sm;
  background-color: @card-bg;
  border-radius: @card-radius;
  box-shadow: @card-shadow;
  padding: @spacing-sm;
  z-index: 20;
}

.filter-title {
  font-size: @font-size-sm;
  font-weight: 600;
  color: @text-primary;
  margin-bottom: @spacing-xs;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: @spacing-xs;
  margin-bottom: @spacing-xs;
}

.filter-option {
  padding: @spacing-xs @spacing-sm;
  background-color: @border-light;
  color: @text-secondary;
  border-radius: @button-radius;
  font-size: @font-size-xs;
  transition: all @transition-normal;
}

.filter-option.active {
  background-color: @primary-light;
  color: @primary-color;
}

.filter-apply {
  margin-top: @spacing-xs;
  width: 100%;
  padding: @spacing-xs;
  background-color: @primary-color;
  color: #fff;
  border-radius: @button-radius;
  font-size: @font-size-sm;
  text-align: center;
  transition: all @transition-normal;
}

.filter-apply:hover {
  background-color: @primary-dark;
}

/* 地图类型切换样式 */
.map-type-toggle {
  position: absolute;
  bottom: @spacing-xl + 100rpx;
  right: @spacing-sm;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: @spacing-xs;
}

.map-type-button {
  padding: @spacing-xs @spacing-sm;
  background-color: @card-bg;
  border-radius: @button-radius;
  font-size: @font-size-xs;
  color: @text-secondary;
  box-shadow: @card-shadow;
  transition: all @transition-normal;
}

.map-type-button.active {
  background-color: @primary-color;
  color: #fff;
}
